<template>
	<view class="top-box">
		<!-- 系统配置提醒横幅 -->
		<view class="config-alert" v-if="showConfigAlert==true && errorCount>0">
			<view class="alert-content">
				<view class="alert-icon">
					<image src="/static/img/setting_000.png" class="warning-icon"></image>
				</view>
				<view class="alert-text">
					<text class="alert-title">系统配置提醒</text>
					<text class="alert-desc">当前系统尚有{{errorCount}}条重要配置项未完成，可能影响系统正常使用</text>
				</view>
				<view class="alert-actions">
					<a :href="`${$common.baseUrl.host}/admin/#/pages/check/check?firm_id=${resData.firm_id}`" target="_blank" class="config-btn">立即配置</a>
					
					<view class="close-btn" @click="closeAlert">
						<image src="/static/img/close.png" class="close-icon"></image>
					</view>
				</view>
			</view>
		</view>
		
		<view class="page-header" v-if="islogin">
			<!-- 悬浮菜单 -->
			<view class="left-t" v-if="MenuShow==false" @click="MenuShow=true">
				<image src="/static/img/left-menu.png" class="menu-b"></image>
			</view>
			
			<!-- 管理功能选项栏 -->
			<view class="left-m" v-if="MenuShow">
				<view class="admin_pic" @click="firm_name_update()" v-if="resData.data">
					<view class="firm">
					<text>{{resData.firm}}</text>
					<image class="sousuo" src="/static/img/lfeet.png" @click="MenuShow=false" @click.stop></image>
					</view>
					<view class="name">{{resData.data.name}}</view>
					
				</view>
				<view class="menu-scroll">
					<!-- 分类 -->
					<view v-for="(item,index) in functionList" :key="index">
						<view class="menu-tab" 
						@click="$common.noMultipleClicks('menuOpen',menuOpen,index)">
							<img :src="item.icon" class="t"></img>
							{{item.name}}
							<img :src="item.open==true ? '@../../static/img/arrow.png':'@../../static/img/arrow1.png'" class="arrow" v-if="item.page.length>0"></img>
						</view>
						
						<!-- 子栏目 -->
						<view v-for="(items,indexs) in item.page" 
							v-if="item.open==true"
							:title="items.title"
							@click="$common.noMultipleClicks('onOpenPages',onOpenPages,index,indexs)" 
							:key="indexs" 
							:class="menu_id==items.id?'choose_detail ':'detail '">
							{{items.name}}
						</view>
					</view>
				</view>
			</view>
			<!-- 管理功能选项栏end -->
			
			<!-- 管理具体界面 -->
			<view class="page-box justify">
				<!-- 各功能组件 -->
				<shopping_admin :isPop="true" v-if="page.shopping_admin" v-show="menu_id==21" class="page-boxs"></shopping_admin>
				<delete_log v-if="page.delete_log" v-show="menu_id==67" class="page-boxs"></delete_log>
				<ad_my_list v-if="page.ad_my_list" v-show="menu_id==360"></ad_my_list>
				<ad_group_list v-if="page.ad_group_list" v-show="menu_id==363"></ad_group_list>
				<ad_card_list v-if="page.ad_card_list" v-show="menu_id==362"></ad_card_list>
				<ad_setting v-if="page.ad_setting" v-show="menu_id==361"></ad_setting>
				<location_log v-if="page.location_log" v-show="menu_id==66" class="page-boxs"></location_log>
				<goodsMarkRecord v-if="page.goodsCheck" v-show="menu_id==23" class="page-boxs" PostType="getGoodsCheck"></goodsMarkRecord>
				<goodsMarkRecord v-if="page.replenish_stock" v-show="menu_id==24" class="page-boxs" PostType="getReplenishStock"></goodsMarkRecord>
				<goodsMarkRecord v-if="page.UpdateMoney" v-show="menu_id==28" class="page-boxs" PostType="getUpdateMoney"></goodsMarkRecord>
				<examine_goods v-if="page.examine_goods" :showRoute="true" :showBilling="true" :showGongYing="false" :examineGoods="true" v-show="menu_id==25" :show="menu_id==25" class="page-boxs"></examine_goods>
				<person_admin v-if="page.person_admin" v-show="menu_id==31" class="page-boxs" status="firm_user_list" sendType="kh"></person_admin>
				<user_map v-if="page.user_map" v-show="menu_id==32" class="page-boxs"></user_map>
				<person_admin v-if="page.user_process" v-show="menu_id==33" class="page-boxs" status="user_process" sendType="process"></person_admin>
				<person_admin v-if="page.user_vender" v-show="menu_id==34" class="page-boxs" status="firm_user_list" sendType="gys"></person_admin>
				<person_admin v-if="page.user_admin" v-show="menu_id==35" class="page-boxs" status="firm_user_list" sendType="yg"></person_admin>
				<route_list v-if="page.route_list" v-show="menu_id==36" class="page-boxs"></route_list>
				<user_gorup v-if="page.user_gorup" v-show="menu_id==37" class="page-boxs"></user_gorup>
				<user_level v-if="page.user_level" v-show="menu_id==38" class="page-boxs"></user_level>
				<goodsMarkRecord v-if="page.goodsMarkRecord" v-show="menu_id==76" class="page-boxs" PostType="getGoodsMarkRecord"></goodsMarkRecord>
				<sell v-if="page.sell" :showRoute="true" :showBilling="true" :showGongYing="false" v-show="menu_id==41" class="page-boxs"></sell>
				<sell v-if="page.jinhuo" :showRoute="false" :showBilling="true" :showGongYing="true" v-show="menu_id==42" class="page-boxs"></sell>
				<sell v-if="page.diaobo" :showRoute="false" :showBilling="true" :showGongYing="false" v-show="menu_id==43" :showDiaobo="true" class="page-boxs"></sell>
				<chat v-if="page.chat" v-show="menu_id==90" class="page-boxs"></chat>
				<order_money v-if="page.order_money" v-show="menu_id==73" class="page-boxs"></order_money>
				<goods_money v-if="page.goods_money" v-show="menu_id==77" class="page-boxs"></goods_money>
				<user_astrict v-if="page.user_astrict" v-show="menu_id==62" class="page-boxs"></user_astrict>
				<setting v-if="page.setting" v-show="menu_id==63" class="page-boxs"></setting>
				<mp_setting v-if="page.mp_setting" v-show="menu_id==11" class="page-boxs"></mp_setting>
				<mpTabBar v-if="page.mpTabBar" v-show="menu_id==15" class="page-boxs"></mpTabBar>
				<admin_home v-if="page.admin_home" v-show="menu_id==72" class="page-boxs"></admin_home>
				<user_data_all v-if="page.user_data_all" v-show="menu_id==74" PostType="1" class="page-boxs"></user_data_all>
				<route_data_all v-if="page.route_data_all" v-show="menu_id==75" class="page-boxs"></route_data_all>
				<sales_plan v-if="page.sales_plan" v-show="menu_id==12" class="page-boxs"></sales_plan>
				<max_out_plan v-if="page.max_out_plan" v-show="menu_id==13" class="page-boxs"></max_out_plan>
				<print_jcp v-if="page.print_jcp" v-show="menu_id==61" class="page-boxs"></print_jcp>
				<pick_records_huizong v-if="page.pick_records" v-show="menu_id==27" actionType="0" class="page-boxs"></pick_records_huizong>
				<pick_records_huizong v-if="page.fenhuo" v-show="menu_id==271" actionType="1" class="page-boxs"></pick_records_huizong>
				<pick_records_huizong v-if="page.peisong" v-show="menu_id==272" actionType="2" class="page-boxs"></pick_records_huizong>
				<position v-if="page.position" v-show="menu_id==29" class="page-boxs"></position>
			</view>
			<!-- 管理具体界面end -->

			<!-- 其他程序二维码 -->
			<uni-popup ref="appQrCode" type="center" title="手机程序" minHeight="auto" minWidth="auto">
				<view class="box-infoss">
					<view class="justify margin gap10">
						<img :src="mp_qrcode" class=""></img>
						<view selectable="true" class="qrcodeTitle">使用微信进行扫码进入小程序使用</view>
					</view>
				</view>
			</uni-popup>
			<!-- end -->
		</view>
	</view>
</template>

<script>
	import chat from "@/pages/chat/chat.vue"
	import person_admin from "@/components/user/list.vue"
	import examine_goods from "@/pages/examine_goods/examine_goods.vue"
	import shopping_admin from "@/components/goods/goods.vue"
	import sell from "@/components/admin-components/sell.vue"
	import order_money from "@/components/admin-components/order_money.vue"
	import goods_money from "@/components/admin-components/goods_money.vue"
	import user_astrict from "@/components/user/user_astrict.vue"
	import setting from "@/components/admin-components/setting.vue"
	import mp_setting from "@/components/admin-components/mp_setting.vue"
	import mpTabBar from "@/components/mp/mp_TabBar.vue"
	import admin_home from "@/components/admin-components/admin_home.vue"
	import user_data_all from "@/components/user/user_data_all.vue"
	import user_map from "@/pages/map/user_map.vue"
	import sales_plan from "@/components/sales_plan/sales_plan.vue"
	import max_out_plan from "@/components/sales_plan/max_out_plan.vue"
	import derate from "@/components/sales_plan/derate.vue"
	import route_data_all from "@/components/route/route_data_all.vue"
	import print_jcp from "@/components/print_jcp/print_jcp.vue"
	import route_list from "@/components/route/list.vue"
	import user_gorup from "@/components/user/gorup.vue"
	import user_level from "@/components/user/level.vue"
	import goodsMarkRecord from "@/components/goodsMarkRecord/goodsMarkRecord.vue"
	import pick_records_huizong from "@/pages/pick/huizong.vue"
	import position from "@/components/position/position.vue"
	import ad_card_list from "@/components/ad/card.vue"
	import ad_my_list from "@/components/ad/list.vue"
	import ad_group_list from "@/components/ad/group.vue"
	import ad_setting from "@/components/ad/setting.vue"
	import delete_log from "@/components/delete_log.vue"
	import location_log from "@/components/location_log.vue"

 
	export default{
		components: {
			chat,
			delete_log,
			ad_my_list,
			ad_group_list,
			ad_card_list,
			ad_setting,
			location_log,
			position,
			user_gorup,
			user_level,
			person_admin,
			shopping_admin,
			examine_goods,
			sell,
			order_money,
			goods_money,
			user_astrict,
			setting,
			mp_setting,
			mpTabBar,
			admin_home,
			user_data_all,
			route_data_all,
			user_map,
			sales_plan,
			max_out_plan,
			derate,
			print_jcp,
			pick_records_huizong,
			goodsMarkRecord,
			route_list,
		},
       
		data(){
			return{
				tips:'//开发者微信：chongzi_0000，接单进销存、商城、小程序、官网、网站等等.......',
				errorCount:-1,//控制配置提醒横幅显示
				showConfigAlert: true, // 控制配置提醒横幅显示
				MenuShow:true,
				QrCode:{
					show:false,
					url:'',
				},
				mp_qrcode:'',
				islogin:false,
				resData:{},
				menu_id:41,
				name:'',
				functionList: [
				    {
				        name: '核心业务',
				        icon:'@../../static/img/goods.png',
				        open:true,
				        page:[
				            {
				                name:'销售开单',
				                id:41,
				                open:true,
				                title:"为业务员提供便捷的下单界面，支持草稿单保存、客户历史订单快速查阅、欠款状况与复购详情分析，提升销售效率。",
				            },
				            {
				                name:'采购开单',
				                id:42,
				                open:true,
				                title:"仓库内部进货流程优化，支持草稿单功能，便捷查看供应商历史交易记录、欠款情况及商品复购分析，确保供应链稳定高效。",
				            },
				            {
				                name:'多仓调拨',
				                id:43,
				                open:true,
				                title:"多仓库间库存调拨管理，支持调拨单创建、审批流程、实时库存同步，优化库存分布。",
				                success:false,
				            },
				        ]
				    },
					{
					    name: '手机程序',
					    icon:'@../../static/img/mp.png',
					    open:false,
					    page:[
					        {
					            name:'手机客户端',
					            id:14,
					            open:false,
					            nowPages:false,
					            title:"",
					        },
					        {
					            name:'手机管理端',
					            id:141,
					            open:false,
					            nowPages:false,
					            title:"",
					        }
					    ]
					},
				    {
				        name: '客户关系',
				        icon:'@../../static/home/renshu.png',
				        open:false,
				        page:[
				            {
				                name:'客户管理',
				                id:31,
				                open:false,
				                title:"实现客户信息的全面管理，包括增删改操作、拜访与下单记录、欠款与销售额监控、积分管理，并支持线路与客户分组，实现差异化价格策略。",
				            },
				            {
				                name:'客户地图',
				                id:32,
				                open:false,
				                title:"通过地图可视化展示客户分布，结合销售额、欠款额及热门区域分析，为市场布局与业务拓展提供战略指导。",
				            },
				            {
				                name:'客户审核',
				                id:33,
				                open:false,
				                title:"对新开发客户及自助注册用户进行资质审核，确保业务合作的安全性与合规性。",
				            },
				            {
				                name:'供应商管理',
				                id:34,
				                open:false,
				                title:"全面管理供应商信息，支持增删改操作，优化供应链管理流程。",
				            },
				            {
				                name:'员工管理',
				                id:35,
				                open:false,
				                title:"内部员工信息的集中管理，涵盖增删改功能，确保团队信息准确无误。",
				            },
				        ]
				    },
				    {
				        name: '仓库管理',
				        icon:'@../../static/img/ck.png',
				        open:false,
				        page:[
				            {
				                name:'商品中心',
				                id:21,
				                open:false,
				                nowPages:false,
				                title:"集商品信息维护、图片管理、分类体系、盘点详情、销售记录、进货记录、退回记录、价格调整历史、赠送记录及标签打印等功能于一体，实现商品全生命周期管理。",
				            },
				            {
				                name:'货位优化',
				                id:29,
				                open:false,
				                nowPages:false,
				                title:"智能货位规划与管理，优化仓库空间利用率，提升拣货效率。",
				            },
				            {
				                name:'出库检验',
				                id:25,
				                open:true,
				                title:"订单出库前的质量检验流程，确保商品质量符合标准，减少售后问题。",
				            },
				            {
				                name:'拣货记录',
				                id:27,
				                open:false,
				                nowPages:false,
				                title:"",
				            },
				            {
				                name:'分货记录',
				                id:271,
				                open:false,
				                nowPages:false,
				                title:"按线路、区域进行货物分拣，优化配送前准备工作。",
				            },
				            {
				                name:'配送记录',
				                id:272,
				                open:false,
				                nowPages:false,
				                title:"短途配送任务分配与进度跟踪，确保货物及时送达。",
				            },
				            {
				                name:'新品记录',
				                id:24,
				                open:false,
				                title:"新进货品入库即时提醒，助力业务员快速掌握库存动态，减少因库存不确定性导致的沟通成本。",
				            },
				            {
				                name:'降价记录',
				                id:28,
				                open:false,
				                title:"商品价格变动管理与通知，确保价格信息及时同步。",
				            },
				            {
				                name:'盘点记录',
				                id:23,
				                open:false,
				                title:"定期盘点库存，记录盘点结果并需专人审核，确保库存数据准确无误，为库存管理提供坚实基础。",
				            },
				        ]
				    },
				    {
				        name: '财务中心',
				        icon:'@../../static/img/cw.png',
				        open:false,
				        page:[
				            {
				                name:'经营看板',
				                id:72,
				                open:false,
				                title:"全面展示系统核心数据概览，包括线路回款总览、新增客户数量、成交订单数、应收账款余额及销售业绩统计，为管理层提供精准决策支持。"
				            },
				            {
				                name:'客户回款',
				                id:74,
				                open:false,
				                title:"细致追踪各线路客户的货款回收进度，支持按年、月、日粒度查看，确保资金回笼高效透明，提升财务流动性管理。",
				            },
				            {
				                name:'线路回款',
				                id:75,
				                open:false,
				                title:"深入分析各线路货款回收情况，以精细时间维度展现回款进度，助力财务规划及风险控制策略制定。",
				            },
				            {
				                name:'客户行为',
				                id:76,
				                open:false,
				                title:"全方位记录客户在商城的商品浏览轨迹，通过数据分析洞察消费者偏好，优化商品布局与营销策略。",
				            },
				            {
				                name:'订单汇总列表',
				                id:73,
				                open:false,
				                title:"集成销售、退货、进货等全链条单据管理，多维度利润分析，为成本控制与盈利优化提供数据支撑。",
				            },
				            {
				                name:'订单详细列表',
				                id:77,
				                open:false,
				                title:"单品利润贡献度分析，识别高利润商品与滞销商品，优化商品结构。",
				            },
				        ]
				    },
				    {
				        name: '营销推广',
				        icon:'@../../static/img/tab-cart-current.png',
				        open:false,
				        page:[
				            {
				                name:'商城布局',
				                id:15,
				                open:false,
				                nowPages:false,
				                title:"商城页面结构设计与栏目管理，打造最佳用户体验。",
				            },
				            {
				                name:'商城首页',
				                id:11,
				                open:false,
				                nowPages:false,
				                title:"支持首页内容自定义，根据市场趋势与用户偏好调整布局，提升商城吸引力。",
				            },
				            {
				                name:'单品促销',
				                id:12,
				                open:false,
				                nowPages:false,
				                title:"针对特定商品制定促销计划，提升单品销量与品牌曝光度。",
				            },
				            {
				                name:'满赠活动',
				                id:13,
				                open:false,
				                nowPages:false,
				                title:"设置满额赠品活动，刺激消费，增强客户忠诚度。",
				            }
				        ]
				    },
				    {
				        name: '组织体系',
				        icon:'@../../static/img/fenzu.png',
				        open:false,
				        page:[
				            {
				                name:'配送线路',
				                id:36,
				                open:false,
				                title:"配送线路规划与管理，优化配送效率与成本。",
				            },
				            {
				                name:'客户分组',
				                id:37,
				                open:false,
				                title:"客户分类管理，实现差异化服务与营销策略。",
				            },
				            {
				                name:'价格体系',
				                id:38,
				                open:false,
				                title:"多级价格体系配置，支持不同客户群体的差异化定价。",
				            },
				        ]
				    },
				    {
				        name: '社交互动',
				        icon:'@../../static/tabbar/tab71.png',
				        open:false,
				        page:[
				            {
				                name:'内部通讯',
				                id:90,
				                open:false,
				                title:"团队内部即时通讯，提升沟通效率。",
				            },
				            {
				                name:'动态广场',
				                id:360,
				                open:false,
				                title:"企业内部信息分享与交流平台。",
				            },
				            {
				                name:'群组管理',
				                id:363,
				                open:false,
				                title:"群聊创建与管理，支持项目协作与团队沟通。",
				            },
				            {
				                name:'名片交换',
				                id:362,
				                open:false,
				                title:"电子名片管理与交换，便捷商务社交。",
				            },
				            {
				                name:'社区设置',
				                id:361,
				                open:false,
				                title:"社交功能参数配置与管理。",
				            },
				        ]
				    },
				    {
				        name: '系统管理',
				        icon:'@../../static/img/setting.png',
				        open:false,
				        page:[
				            {
				                name:'打印设置',
				                id:61,
				                open:false,
				                nowPages:true,
				                title:"支持进货单、销售单、商品标签等一键云打印，无论内外场景，手机即可操作，提升工作效率。",
				            },
				            {
				                name:'权限管理',
				                id:62,
				                open:false,
				                nowPages:false,
				                title:"精细设置不同用户的访问权限，确保数据安全与业务流程合规，满足专业企业的权限控制需求。",
				            },
				            {
				                name:'系统配置',
				                id:63,
				                open:false,
				                nowPages:false,
				                title:"为最高级别管理员提供全面的安全配置选项，确保系统稳定运行与数据安全防护。",
				            },
				            {
				                name:'登录审计',
				                id:66,
				                open:false,
				                nowPages:false,
				                title:"用户登录记录与安全审计，保障系统访问安全。",
				            },
				            {
				                name:'删除日志',
				                id:67,
				                open:false,
				                nowPages:false,
				                title:"关键操作记录追踪，便于问题排查与责任追溯。",
				            },
				            {
				                name:'修改密码',
				                id:65,
				                open:false,
				                nowPages:false,
				                title:"密码策略与安全参数配置。",
				            },
				            {
				                name:'退出登录',
				                id:64,
				                open:false,
				                nowPages:false,
				                title:"安全退出当前账号。",
				            }
				        ]
				    },
				],
				
				page:{
					chat:false,
					location_log:false,
					delete_log:false,
					ad_my_list:false,
					ad_group_list:false,
					ad_card_list:false,
					ad_setting:false,
					examine_goods:false,
					person_admin:false,
					goodsCheck:false,
					replenish_stock:false,
					UpdateMoney:false,
					route_list:false,
					user_gorup:false,
					user_level:false,
					shopping_admin:false,
					sell:true,
					order_money:false,
					goods_money:false,
					user_astrict:false,
					setting:false,
					mp_setting:false,
					admin_home:false,
					mpTabBar:false,
					user_data_all:false,
					route_data_all:false,
					user_map:false,
					sales_plan:false,
					max_out_plan:false,
					derate:false,
					user_process:false,
					user_vender:false,
					user_admin:false,
					print_jcp:false,
					peisong:false,
					pick_records:false,
					fenhuo:false,
					goodsMarkRecord:false,
					position:false,
					diaobo:false,
				},
			}
		},
		onLoad(res) {
			var that = this
			this.islogin = that.$common.checkLogin()== '' ? false:true;
			if(this.islogin==false){
				if(res.appid==undefined){
				}else{
					this.$global.setStorageRoute('firmArrId',res.appid)
				}
				that.$common.redirectTo("/pages/login/login")
				return
			}
			that.user_info()
			this.$routeData.loadGroup();
			this.$routeData.loadYuangong();
			this.$routeData.loadLevel()
			this.check()
		},
		methods:{
			check() {
				var that = this
				that.$common.get_request(
					{
						type: 'check',
						method_name:'GetSteps'
					},
					(res)=>{
						that.errorCount = res.errorCount
					}
				);
			},
			// 关闭配置提醒横幅
			closeAlert() {
				this.showConfigAlert = false;
			},
			
			// 跳转到配置页面
			goToConfig() {
				// 这里可以跳转到系统配置页面
				// 例如：uni.navigateTo({url: '/pages/config/config'})
				console.log("跳转到配置页面");
			},
			
			firm_name_update(){
				var that = this
				that.$routeData.firm_name_update(that.resData.firm,(updateName)=>{
					that.resData.firm = updateName
				})
			},
			
			user_info(){
				var that = this
				that.$common.get_request(
					{
						type:'user_info',
					},
					(res)=>{
						uni.setNavigationBarTitle({title: res.firm})
						that.resData = res
						uni.setStorage({
							key:'lbs',
							data:res.lbs
						})
						that.$routeData.SetAstrict(res)
						that.$routeData.LoadAstrict(res)
					}
				);
			},

			onOpenPages(i,ii){
				var that = this
				if(that.functionList[i].page[ii].id==65 ){
					that.$routeData.firm_user_password("",true)
					return;
				}
				if(that.functionList[i].page[ii].id==14 || that.functionList[i].page[ii].id==141){
					that.$refs.appQrCode.open()
					that.$common.get_request(
						{
							type:'getwxacodeunlimit',
							path:'home',
							deviceType:that.functionList[i].page[ii].id==14 ? 0:1
						},
						(res)=>{
							that.mp_qrcode = 'data:image/png;base64,' +res.base64
						},
						(res)=>{},
					);
					return;
				}
				
				if(that.functionList[i].page[ii].id==64){
					uni.showModal({
						title: '提示',
						content: '是否安全退出系统？',
						confirmText: "退出",
						success: function (res) {
							if (res.confirm) {
								that.logout()
							}
						}
					});
					return ;
				}
				
				let menuID = that.functionList[i].page[ii].id
				
				if(menuID==31){
					that.page.person_admin =true
				}else if(menuID==11){
					that.page.mp_setting =true
				}else if(menuID==15){
					that.page.mpTabBar =true
				}else if(menuID==12){
					that.page.sales_plan =true
				}else if(menuID==13){
					that.page.max_out_plan =true
				}else if(menuID==15){
					that.page.derate =true
				}else if(menuID==21){
					that.page.shopping_admin =true
				}else if(menuID==23){
					that.page.goodsCheck =true
				}else if(menuID==24){
					that.page.replenish_stock =true
				}else if(menuID==25){
					that.MenuShow = false
					that.page.examine_goods =  true
				}else if(menuID==27){
					that.page.pick_records =true
				}else if(menuID==271){
					that.page.fenhuo =true
				}else if(menuID==28){
					that.page.UpdateMoney =true
				}else if(menuID==29){
					that.page.position =true
				}else if(menuID==41){
					that.page.sell =true
				}else if(menuID==42){
					that.page.jinhuo =true
				}else if(menuID==43){
					that.page.diaobo =true
				}else if(menuID==73){
					that.page.order_money =true
				}else if(menuID==77){
					that.page.goods_money =true
				}else if(menuID==61){
					that.page.print_jcp =true
				}else if(menuID==272){
					that.page.peisong =true
				}else if(menuID==62){
					that.page.user_astrict =true
				}else if(menuID==63){
					that.page.setting =true
				}else if(menuID==64){
					return ;
				}else if(menuID==66){
					that.page.location_log =true
				}else if(menuID==67){
					that.page.delete_log =true
				}else if(menuID==360){
					that.page.ad_my_list =true
				}else if(menuID==363){
					that.page.ad_group_list =true
				}else if(menuID==361){
					that.page.ad_setting =true
				}else if(menuID==362){
					that.page.ad_card_list =true
				}else if(menuID==72){
					that.page.admin_home =true
				}else if(menuID==74){
					that.page.user_data_all =true
				}else if(menuID==75){
					that.page.route_data_all =true
				}else if(menuID==76){
					that.page.goodsMarkRecord =true
				}else if(menuID==32){
					that.page.user_map =true
				}else if(menuID==33){
					that.page.user_process =true
				}else if(menuID==34){
					that.page.user_vender =true
				}else if(menuID==35){
					that.page.user_admin =true
				}else if(menuID==36){
					that.page.route_list =true
				}else if(menuID==37){
					that.page.user_gorup =true
				}else if(menuID==38){
					that.page.user_level =true
				}else if(menuID==90){
					that.page.chat =true
				}
				
				that.menu_id = menuID;
				that.name = that.functionList[i].page[ii].name
			},
			
			menuOpen(index){
				var that = this
				that.functionList.forEach(function(item,i) {
					if(i==index){
						var t = that.functionList[i].open;
						that.functionList[i].open = !t;
						
						if(that.functionList[i].id && that.functionList[i].id== 90){
							that.page.chat = true
							that.menu_id = that.functionList[i].id;
						}
					}
					that.$set(that.functionList,i,that.functionList[i])
				});
			},
			
			close(){
				this.$refs.popup.close()
			},
			
			logout(){
				var that=this
				that.$common.get_request(
					{
						type:'logout',
					},
					(res)=>{
						that.$common.removeStorage()
						that.$common.redirectTo(`/pages/login/login?appid=${that.resData.data.firm_id}`)
					}
				);
			},
		}
	}
</script>

<style>
	/* 系统配置提醒横幅样式 */
	.config-alert {
		position: sticky;
		top: 0;
		left: 0;
		width: 100%;
		background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
		color: white;
		z-index: 9999;
		box-shadow: 0 2px 12px rgba(255, 107, 0, 0.3);
	}
	
	.alert-content {
		display: flex;
		align-items: center;
		padding: 12px 16px;
	}
	
	.alert-icon {
		margin-right: 12px;
		display: flex;
		align-items: center;
	}
	
	.warning-icon {
		width: 24px;
		height: 24px;
	}
	
	.alert-text {
		flex: 1;
		display: flex;
		flex-direction: column;
	}
	
	.alert-title {
		font-size: 16px;
		font-weight: 600;
		margin-bottom: 2px;
	}
	
	.alert-desc {
		font-size: 13px;
		opacity: 0.9;
	}
	
	.alert-actions {
		display: flex;
		align-items: center;
		gap: 12px;
	}
	
	.config-btn {
		background: rgba(255, 255, 255, 0.2);
		border: 1px solid rgba(255, 255, 255, 0.4);
		color: white;
		padding: 6px 16px;
		border-radius: 16px;
		font-size: 13px;
		font-weight: 500;
		backdrop-filter: blur(10px);
		transition: all 0.3s ease;
	}
	
	.config-btn:active {
		background: rgba(255, 255, 255, 0.3);
		transform: scale(0.98);
	}
	
	.close-btn {
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		transition: background 0.3s ease;
	}
	
	.close-btn:active {
		background: rgba(255, 255, 255, 0.2);
	}
	
	.close-icon {
		width: 16px;
		height: 16px;
		opacity: 0.8;
	}
	
	/* 优化字体和整体样式 */
	.top-box {
		font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
		overflow-x: auto;
		overflow-y: hidden;
		position: absolute;
		width: 100%;
		height: 100%;
	}
	
	/* 左侧菜单容器 */
	.left-m {
		display: flex;
		flex-direction: column;
		width: 200px;
		height: 100%;
		background-color: #ffffff;
		box-shadow: 1px 0 10px rgba(0, 0, 0, 0.08);
	}
	
	/* 顶部公司信息区域 */
	.admin_pic {
		padding: 24px 16px;
		border-bottom: 1px solid #eaeef3;
		position: relative;
	}
	
	.firm {
		font-size: 18px;
		font-weight: 600;
		color: #0f66e0;
		margin-bottom: 4px;
		line-height: 1.4;
	}
	
	.name {
		font-size: 13px;
		color: #666;
		letter-spacing: 0.5px;
		line-height: 1.4;
	}
	
	/* 菜单项 */
	.menu-tab {
		padding: 16px 20px;
		color: #444;
		display: flex;
		align-items: center;
		transition: all 0.3s ease;
		border-bottom: 1px solid #f5f7fa;
		cursor: pointer;
		font-size: 15px;
		font-weight: 500;
	}
	
	.menu-tab:hover {
		background-color: rgba(15, 102, 224, 0.05);
		color: #0f66e0;
	}
	
	/* 菜单图标 */
	.menu-tab .t {
		width: 18px;
		height: 18px;
		margin-right: 12px;
		filter: brightness(0.9);
	}
	
	/* 下拉箭头 */
	.menu-tab .arrow {
		margin-left: auto;
		width: 14px;
		height: 14px;
		transition: transform 0.3s ease;
	}
	
	.menu-tab[open="true"] .arrow {
		transform: rotate(180deg);
	}
	
	.arrow1 {
		height: 16px;
		width: 16px;
	}
	
	/* 子菜单项 */
	.detail {
		padding: 14px 20px 14px 52px;
		font-size: 14px;
		color: #666;
		position: relative;
		transition: all 0.2s ease;
		border-bottom: 1px solid #f9f9f9;
		cursor: pointer;
		line-height: 1.4;
	}
	
	.detail:hover {
		background-color: rgba(15, 102, 224, 0.08);
		color: #0f66e0;
	}
	
	/* 当前选中状态 */
	.choose_detail {
		background-color: rgba(15, 102, 224, 0.1) !important;
		color: #0f66e0 !important;
		font-weight: 500;
		position: relative;
		padding: 14px 20px 14px 52px;
		display: flex;
		flex-direction: row;
		font-size: 14px;
		align-items: center;
		line-height: 1.4;
	}
	
	.choose_detail::before {
		content: "";
		position: absolute;
		left: 0;
		top: 0;
		height: 100%;
		width: 3px;
		background: #0f66e0;
	}
	
	/* 左侧菜单按钮 */
	.left-t {
		display: flex;
		flex-direction: column;
		width: 40px;
		background-color: #343434;
		height: 100%;
	}
	
	.left-t .image {
		width: 25px;
		height: 25px;
		padding: 3px;
		cursor: pointer;
	}
	
	.menu-b {
		width: 20px;
		height: 20px;
		margin: 12px 8px;
		cursor: pointer;
	}
	
	/* 二维码弹窗样式 */
	.box-infoss {
		padding: 20px;
		text-align: center;
	}
	
	.qrcodeTitle {
		font-size: 14px;
		color: #666;
		margin-top: 12px;
		line-height: 1.5;
	}
	
	/* 其他样式优化 */
	.page-box {
		flex: 1;
		height: 100%;
	}
	
	.page-boxs {
		width: 100%;
		height: 100%;
	}
	
	.justify {
		display: flex;
	}
	
	.margin {
		margin: 0 auto;
	}
	
	.gap10 {
		gap: 10px;
	}
	
	/* 响应式字体大小调整 */
	@media (max-width: 768px) {
		.config-alert {
			padding: 10px 12px;
		}
		
		.alert-content {
			padding: 8px 12px;
		}
		
		.alert-title {
			font-size: 15px;
		}
		
		.alert-desc {
			font-size: 12px;
		}
		
		.config-btn {
			padding: 5px 12px;
			font-size: 12px;
		}
		
		.left-m {
			width: 180px;
		}
		
		.menu-tab {
			padding: 14px 16px;
			font-size: 14px;
		}
		
		.detail, .choose_detail {
			padding: 12px 16px 12px 48px;
			font-size: 13px;
		}
		
		.firm {
			font-size: 16px;
		}
		
		.name {
			font-size: 12px;
		}
	}
</style>